//
//  ControllerForClickCollectionView.m
//  ProjectA
//
//  Created by dllo on 16/1/29.
//  Copyright © 2016年 刘旺辉. All rights reserved.
//

#import "ControllerForClickCollectionView.h"

@interface ControllerForClickCollectionView ()
@property (nonatomic, strong) UIWebView *webView;
@end

@implementation ControllerForClickCollectionView
- (void)dealloc {
    [_url release];
    [_webView release];
    [super dealloc];
}

- (void)setLightDayModel {
    [super setLightDayModel];
    self.barBackgroundView.backgroundColor = RGBA(44, 211, 209, 1);
}

- (void)setNightDayModel {
    [super setNightDayModel];
    self.barBackgroundView.backgroundColor = RGBA(52, 52, 52, 1);
}
- (void)viewWillAppear:(BOOL)animated {
    if (ISNIGHT) {
        [self setNightDayModel];
    } else {
        [self setLightDayModel];
    }
}
- (void)viewWillDisappear:(BOOL)animated {
    self.barBackgroundView.backgroundColor = L_COLOR_CLEAR;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self createWebView];
    [self settingsNavigationController];
}

- (void)createWebView {
    self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    self.webView.backgroundColor = [UIColor clearColor];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.url]];
    [self.webView loadRequest:request];
    [self.view addSubview:self.webView];
    [_webView release];
}

- (void)settingsNavigationController {
    
    self.navigationItem.title = @"";
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"iconfont-fanhui(heise)"] style:UIBarButtonItemStylePlain target:self action:@selector(houtuiAction:)];
    
}

- (void)houtuiAction:(UIBarButtonItem *)item {
    
    [self.navigationController popViewControllerAnimated:YES];
    self.tabBarController.tabBar.hidden = NO;
    
}







- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
